<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditTurnoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditTurnoLabel_id}" for="id" />
                    <h:inputText id="id" value="#{turnoController.selected.id}" title="#{bundle.EditTurnoTitle_id}" required="true" requiredMessage="#{bundle.EditTurnoRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.EditTurnoLabel_entrada}" for="entrada" />
                    <h:inputText id="entrada" value="#{turnoController.selected.entrada}" title="#{bundle.EditTurnoTitle_entrada}" >
                        <f:convertDateTime pattern="HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditTurnoLabel_salida}" for="salida" />
                    <h:inputText id="salida" value="#{turnoController.selected.salida}" title="#{bundle.EditTurnoTitle_salida}" >
                        <f:convertDateTime pattern="HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditTurnoLabel_consultorio}" for="consultorio" />
                    <h:selectOneMenu id="consultorio" value="#{turnoController.selected.consultorio}" title="#{bundle.EditTurnoTitle_consultorio}" >
                        <f:selectItems value="#{consultorioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{turnoController.update}" value="#{bundle.EditTurnoSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditTurnoViewLink}"/>
                <br />
                <h:commandLink action="#{turnoController.prepareList}" value="#{bundle.EditTurnoShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditTurnoIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
